package org.tio.sitexxx.service.vo;

import org.tio.sitexxx.service.model.main.IpInfo;
import org.tio.sitexxx.service.model.main.UserAgent;

/**
 * @author tanyaowu 
 * 2016年9月27日 上午10:42:10
 */
public class RequestExt implements java.io.Serializable {
	private static final long	serialVersionUID	= 2201875338516562322L;
	/**
	 * 是否是从浏览器访问过来的
	 */
	private boolean				fromBrowser			= true;
	/**
	 * 是否是从移动浏览器访问过来的
	 */
	private boolean				fromBrowserMobile	= false;
	/**
	 * 是否是从PC浏览器访问过来的
	 */
	private boolean				fromBrowserPc		= true;
	/**
	 * 浏览器信息，从浏览器访问过来的才有此对象
	 */
	private UserAgent			userAgent;
	/**
	 * ip信息
	 */
	private IpInfo				ipInfo;
	/**
	 * 是否能做http缓存（对于一些错误的响应是不能缓存的）
	 */
	private boolean				canCache			= true;
	/**
	 * Response对象是不是从缓存中取的
	 */
	private boolean				fromCache			= false;

	public boolean isFromBrowser() {
		return fromBrowser;
	}

	public void setFromBrowser(boolean fromBrowser) {
		this.fromBrowser = fromBrowser;
	}

	/**
	 * @param args
	 * @author: tanyaowu
	 */
	public static void main(String[] args) {

	}

	public boolean isCanCache() {
		return canCache;
	}

	public void setCanCache(boolean canCache) {
		this.canCache = canCache;
	}

	public boolean isFromCache() {
		return fromCache;
	}

	public void setFromCache(boolean fromCache) {
		this.fromCache = fromCache;
	}

	public boolean isFromBrowserMobile() {
		return fromBrowserMobile;
	}

	public void setFromBrowserMobile(boolean fromBrowserMobile) {
		this.fromBrowserMobile = fromBrowserMobile;
	}

	public UserAgent getUserAgent() {
		return userAgent;
	}

	public void setUserAgent(UserAgent userAgent) {
		this.userAgent = userAgent;
	}

	public boolean isFromBrowserPc() {
		return fromBrowserPc;
	}

	public void setFromBrowserPc(boolean fromBrowserPc) {
		this.fromBrowserPc = fromBrowserPc;
	}

	public IpInfo getIpInfo() {
		return ipInfo;
	}

	public void setIpInfo(IpInfo ipInfo) {
		this.ipInfo = ipInfo;
	}
}
